<!-- 以下为网站首页 -->
<!DOCTYPE html>
<html lang="en">
<script id="allow-copy_script">
    (function agent() {
        let unlock = false
        document.addEventListener('allow_copy', (event) => {
            unlock = event.detail.unlock
        })

        const copyEvents = [
            'copy',
            'cut',
            'contextmenu',
            'selectstart',
            'mousedown',
            'mouseup',
            'mousemove',
            'keydown',
            'keypress',
            'keyup',
        ]
        const rejectOtherHandlers = (e) => {
            if (unlock) {
                e.stopPropagation()
                if (e.stopImmediatePropagation) e.stopImmediatePropagation()
            }
        }
        copyEvents.forEach((evt) => {
            document.documentElement.addEventListener(evt, rejectOtherHandlers, {
                capture: true,
            })
        })
    })()
</script>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>这是我的个人OJ系统</title>
    <style>
        /* 起手式, 100%保证我们的样式设置可以不受默认影响 */
        * {
            /* 消除网页的默认外边距 */
            margin: 0px;
            /* 消除网页的默认内边距 */
            padding: 0px;
            /* 去掉a标签的下划线 */
            text-decoration: none;

        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        .container .navbar {
            width: 100%;
            height: 50px;
            background-color: black;
            /* 给父级标签设置overflow，取消后续float带来的影响 */
            overflow: hidden;
        }

        .container .navbar a {
            /* 设置a标签是行内块元素，允许你设置宽度 */
            display: inline-block;
            /* 设置a标签的宽度,a标签默认行内元素，无法设置宽度 */
            width: 80px;
            /* 设置字体颜色 */
            color: white;
            /* 设置字体的大小 */
            font-size: large;
            /* 设置文字的高度和导航栏一样的高度 */
            line-height: 50px;
            /* 去掉a标签的下划线 */
            text-decoration: none;
            /* 设置a标签中的文字居中 */
            text-align: center;
        }

        /* 设置鼠标事件 */
        .container .navbar a:hover {
            background-color: green;
        }

        .container .navbar .login {
            float: right;
        }

        .container .content {
            /* 设置标签的宽度 */
            width: 800px;
            /* 用来调试 */
            /* background-color: #ccc; */
            /* 整体居中 */
            margin: 0px auto;
            /* 设置文字居中 */
            text-align: center;
            /* 设置上外边距 */
            margin-top: 200px;
        }

        .container .content .font_ {
            /* 设置标签为块级元素，独占一行，可以设置高度宽度等属性 */
            display: block;
            /* 设置每个文字的上外边距 */
            margin-top: 20px;
            /* 去掉a标签的下划线 */
            text-decoration: none;
            /* 设置字体大小*/
            /* font-size: larger; */
        }

        body {
            background-color: black;
            color: white;
            font-family: 'Lucida Grande', Verdana, Arial;
            font-size: 12px;
            background-image: -webkit-gradient(radial,
                    50% 500, 1,
                    50% 500, 400,
                    from(rgba(255, 255, 255, 0.3)),
                    to(rgba(255, 255, 255, 0)));
            background-repeat: no-repeat;
        }

        #container {
            width: 100%;
            height: 100%;
            -webkit-perspective: 800;
            /* For compatibility with iPhone 3.0, we leave off the units here */
            -webkit-perspective-origin: 50% 225px;
        }

        #stage {
            width: 100%;
            height: 430px;
            -webkit-transition: -webkit-transform 2s;
            -webkit-transform-style: preserve-3d;
        }

        #shape {
            position: relative;
            top: 160px;
            margin: 0 auto;
            height: 200px;
            width: 200px;
            -webkit-transform-style: preserve-3d;
        }

        .plane {
            position: absolute;
            display: grid;
            place-items: center;
            height: 200px;
            width: 200px;
            border: 1px solid white;
            -webkit-border-radius: 12px;
            -webkit-box-sizing: border-box;
            text-align: center;
            font-family: Times, serif;
            font-size: 100pt;
            color: black;
            background-color: rgba(255, 255, 255, 0.6);
            -webkit-transition: -webkit-transform 2s, opacity 2s;
            -webkit-backface-visibility: hidden;
        }

        #shape.backfaces .plane {
            -webkit-backface-visibility: visible;
        }

        #shape {
            -webkit-animation: spin 8s infinite linear;
        }

        @-webkit-keyframes spin {
            from {
                -webkit-transform: rotateY(0);
            }

            to {
                -webkit-transform: rotateY(-360deg);
            }
        }

        /* ---------- cube styles ------------- */
        .cube>.one {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateX(90deg) translateZ(100px);
        }

        .cube>.two {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) translateZ(100px);
        }

        .cube>.three {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateY(90deg) translateZ(100px);
        }

        .cube>.four {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateY(180deg) translateZ(100px);
        }

        .cube>.five {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateY(-90deg) translateZ(100px);
        }

        .cube>.six {
            opacity: 0.5;
            -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateX(-90deg) translateZ(100px) rotate(180deg);
        }


        .cube>.seven {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) rotateX(90deg) translateZ(100px) rotate(180deg);
        }

        .cube>.eight {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) translateZ(100px);
        }

        .cube>.nine {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) rotateY(90deg) translateZ(100px);
        }

        .cube>.ten {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) rotateY(180deg) translateZ(100px);
        }

        .cube>.eleven {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) rotateY(-90deg) translateZ(100px);
        }

        .cube>.twelve {
            -webkit-transform: scale3d(0.8, 0.8, 0.8) rotateX(-90deg) translateZ(100px);
        }

        /* ---------- ring styles ------------- */
        .ring>.one {
            -webkit-transform: translateZ(380px);
        }

        .ring>.two {
            -webkit-transform: rotateY(30deg) translateZ(380px);
        }

        .ring>.three {
            -webkit-transform: rotateY(60deg) translateZ(380px);
        }

        .ring>.four {
            -webkit-transform: rotateY(90deg) translateZ(380px);
        }

        .ring>.five {
            -webkit-transform: rotateY(120deg) translateZ(380px);
        }

        .ring>.six {
            -webkit-transform: rotateY(150deg) translateZ(380px);
        }

        .ring>.seven {
            -webkit-transform: rotateY(180deg) translateZ(380px);
        }

        .ring>.eight {
            -webkit-transform: rotateY(210deg) translateZ(380px);
        }

        .ring>.nine {
            -webkit-transform: rotateY(-120deg) translateZ(380px);
        }

        .ring>.ten {
            -webkit-transform: rotateY(-90deg) translateZ(380px);
        }

        .ring>.eleven {
            -webkit-transform: rotateY(300deg) translateZ(380px);
        }

        .ring>.twelve {
            -webkit-transform: rotateY(330deg) translateZ(380px);
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏， 功能不实现-->
        <div class="navbar">
            <a href="/">首页</a>
            <a href="/all_questions">面试题</a>
            <a href="/all_questions4">基础题</a>
            <a href="#">讨论</a>
            <a href="#">求职</a>
            <a class="login" id="login" href="/login">登录</a>
        </div>
        <!-- 网页的内容 -->
        <div class="content">
            <div>
                <img src="/img/ecut5.png" width="134px" height="140px">
            </div>
            <h1 class="font_">欢迎来到东华理工大学OnlineJudge平台</h1>
            <p class="font_" style="font-size: larger;"><a style="color: white;" href="http://t.csdn.cn/vdwmA">OJ平台介绍</a></p>
            <a class="font_" style="font-size: larger; color: white;" href="/all_questions">点我开始编程!</a>
        </div>
        <div id="container">
            <div id="stage">
                <div id="shape" class=" backfaces  cube" onclick="toggleShape()">
                    <div class="plane one">欢</div>
                    <div class="plane two">迎</div>
                    <div class="plane three">来</div>
                    <div class="plane four">到</div>
                    <div class="plane five">东</div>j
                    <div class="plane six">华</div>
                    <div class="plane seven">理</div>
                    <div class="plane eight">工</div>
                    <div class="plane nine">O</div>
                    <div class="plane ten">j</div>
                    <div class="plane eleven">平</div>
                    <div class="plane twelve">台</div>
                </div>
            </div>
        </div>
        <div>
            <h5>East China University of Technology Online Judge 1.0</h5>
            <h5>Copyright © 2023 ecut oj design Team. All Rights Reserved.</h5>
            <h5>Designer & Developer: 王亚林 欧阳东百 邱全敏</h5>
        </div>
    </div>

    <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script>

        var IS_LOGIN_NO = 0;
        var IS_LOGIN_ADMIN = 1;
        var IS_LOGIN_USER = 2;
        $.ajaxSetup({
            beforeSend(xhr) {
                xhr.setRequestHeader("Authorization", sessionStorage.getItem("token"))
            }
        })

        $.ajax({
            type: "post",
            url: "/islogin",
            dataType: "json",
            success: function (res) {
                if (res.status == IS_LOGIN_USER) {
                    $("#login").attr('href', "/login/user/" + res.username);
                    $("#login").text(res.username);
                }
                else if (res.status == IS_LOGIN_ADMIN) {
                    $("#login").attr('href', "/login/admin_users/" + res.username);
                    $("#login").text(res.username);
                }
            }
        })
    </script>
</body>

</html>